x86/levelling: fix breakage on older Intel boxes from c/s 08e7738
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 2 Sep 2016 06:12:29 +0000 (08:12 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 2 Sep 2016 06:12:29 +0000 (08:12 +0200)
commit1461504ce3c414fc5dc717ce16f039d0742b455a
tree13f247b028ccf0bc8d28f27cd0b59e8163b39a8b
parenta4f39a6450abe5207cb33f877b4b6cd5db8a6cca
x86/levelling: fix breakage on older Intel boxes from c/s 08e7738

cpufeat_mask() yields an unsigned integer constant.  As a result, taking its
complement causes zero extention rather than sign extention.

The result is that, when a guest OS has OXSAVE disabled, all features in 1d
are hidden from native CPUID.  Amongst other things, this causes the early
code in Linux to find no LAPIC, but for everything to appear fine later when
userspace is up and running.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Tested-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/cpu/intel.c